package arina.university.model;

import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 15.11.13
 * Time: 13:55
 * To change this template use File | Settings | File Templates.
 */
public class Group {
    private Integer number;
    private String speciality;
    private List<Student> students = new ArrayList<Student>();

    public Group(int n, String speciality) {
        this.number = n;
        this.speciality = speciality;
    }

    List<Subject> subjects = new LinkedList<Subject>();

    public void addSubject(Subject subject) {
        this.subjects.add(subject);
    }



    public void addStudent(Student student) {
       students.add(student);
    }

    public void deleteStudent(Student student)  {
        this.students.remove(student);
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public void setSpeciality(String s) {
        this.speciality = s;
    }

    public String getSpeciality() {
        return speciality;
    }

    public int getQuantity() {
        return students.size();
    }

    public Collection<Student> getStudents() {
        return students;
    }
}
